﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ChiliShopNested.master" AutoEventWireup="true" CodeBehind="ProductNewArrivals.aspx.cs" Inherits="WebApplication1.Pages.ProductNewArrivals" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ChiliShopNestedMasterHeadPlaceHolder" runat="server">
    <script src="/Scripts/jquery-2.1.0.min.js"></script>
    <script src="/Plugins/cycle/jquery.cycle.all.js"></script>
    <script src="/Plugins/cycle/jquery.easing.1.3.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ChiliShopNestedMasterContentPlaceHolder" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#newProductsContainer').cycle({
                fx: 'shuffle',
                sync: false,
                delay: -2000,
                timeout:5000,
                easing: 'easeOutBack',
                cleartypeNoBg:true, //transparent background
                after: onAfter
                //delay: -4000
            });
        });

        function onAfter(curr, next, opts, fwd) {
            //get the height of the current slide
            var $ht = $(this).height();
            //set the container's height to that of the current slide
            $(this).parent().css("height", $ht);        
        }

    </script>
    <div class="products">
       <%-- <div style="width=400px; margin: 0 auto;">--%>
            <asp:ListView ID="newProducts" runat="server">
                <LayoutTemplate>
                    <div id="newProductsContainer">
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                    </div>
                </LayoutTemplate>
                <ItemTemplate>
                    <div class="newProduct">
                        <a href="<%#Eval("DetailPageLink")%>">
                            <img src="<%#Eval("ImagePath")%>" alt="product has no image" />
                        </a>
                        <div class="productDescription">
                            <h4><%#Eval("Name")%></h4>
                            <%-- <p><%#Eval("Description")%></p>
                        <span>Price:<%#Eval("Price")%></span>--%>
                        </div>
                    </div>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <p>Nothing here.</p>
                </EmptyDataTemplate>
            </asp:ListView>
        </div>
    <%--</div>--%>
</asp:Content>
